using System;
using System.Collections.Generic;
using System.Text;

namespace ShoppingList
{
    public class ShoppingList
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private Dictionary<string,ShoppingItem> items = new Dictionary<string,ShoppingItem>();
        public Dictionary<string, ShoppingItem> Items
        {
            get { return items; }
        }

        public ShoppingList(string name)
        {
            this.name = name;
        }

        /// <summary>
        /// Checks if an item with the specified name exists
        /// </summary>
        /// <param name="itemName"></param>
        /// <returns></returns>
        public bool ContainsItemName(string itemName)
        {
            return items.ContainsKey(itemName);
        }
    }
}
